1. Field of the Invention
The present invention relates to a microcomputer and, more particularly, to a microcomputer for substantially changing a program stored in a read-only memory (ROM).
2. Description of the Related Art
In general, a conventional one-chip microcomputer comprises a program counter, a program memory for storing a predetermined program, and an instruction decoder. As is well known, an operation of the one-chip microcomputer is executed as follows. That is, program data read out from the program memory which is addressed by the program counter which is incremented in response to system clocks (not shown) is decoded by the instruction decoder, thereby executing a program.
The program memory normally comprises a mask ROM (Read-Only Memory). A program is written in the mask ROM during a manufacturing process by a manufacturer, and cannot be rewritten by a user. However, when a bug is found in the program written in the mask ROM or the program is to be partially corrected after the manufacture of the one-chip microcomputer, the mask pattern of the ROM must be rewritten, and the manufacturing process of the microcomputer must be restarted. Therefore, several months are required until a corrected one-chip microcomputer is available. In addition, the one-chip microcomputer in which a bug is found in the program written in the mask ROM cannot be reused.
Recently, so-called one-time ROMs which can be rewritten once by a user are commercially available. However, the one-time ROM is very expensive as compared to the mask ROM, and considerable time and labor are required for a user to write a program. Thus, the one-time ROM is not suitable for mass-production products.